<template>
    <p>父组件给的值:{{ count }}</p>
    <input type="button" value="子组件自增" @click="addCount">
</template>

<script setup>

const props = defineProps(['count'])
const emits = defineEmits(['test2add'])
function addCount() {
    emits('test2add')
    console.log('子组件+1');
    
}
</script>